//
//  ChannelCell.swift
//  DoctorVisits
//
//  Created by lanou3g on 16/2/27.
//  Copyright © 2016年 SHH. All rights reserved.
//

import UIKit



class ChannelCell: UITableViewCell {
    
    var imageV:UIImageView? //图片
    var nameL:UILabel?  //分类名
    var number:UILabel? //视屏总数
    var infoL:UILabel? //热播推荐内容
    var into:UILabel?  //进入的大于号图标
    
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.imageV = UIImageView(frame: CGRectMake(self.contentView.frame.size.width*0.04, self.contentView.frame.size.height*0.1, self.contentView.frame.size.width*0.28, self.contentView.frame.size.height*0.8))
        self.imageV?.backgroundColor = UIColor.blueColor()
        self.contentView.addSubview(self.imageV!)
        
        self.nameL = UILabel(frame: CGRectMake(self.contentView.frame.size.width*0.35,self.contentView.frame.size.height*0.2,self.contentView.frame.size.width*0.22,self.contentView.frame.size.height*0.35))
        //        self.nameL?.backgroundColor = UIColor.yellowColor()
        self.nameL?.text = "电视剧"
        //        self.nameL?.textAlignment = .Center
        self.nameL?.font = UIFont.systemFontOfSize(25)
        self.contentView.addSubview(self.nameL!)
        
        self.number = UILabel(frame: CGRectMake(self.contentView.frame.size.width*0.57,self.contentView.frame.size.height*0.25,self.contentView.frame.size.width*0.325,self.contentView.frame.size.height*0.3))
        self.number?.text = "(12354)"
        self.number?.textAlignment = .Left
        //        self.number?.backgroundColor = UIColor.greenColor()
        self.contentView.addSubview(self.number!)
        
        self.infoL = UILabel(frame: CGRectMake(self.contentView.frame.size.width*0.35,self.contentView.frame.size.height*0.55,self.contentView.frame.size.width*0.55,self.contentView.frame.size.height*0.35))
        self.infoL?.text = "芈月传 甄嬛传 古剑奇谭"
        //        self.infoL?.backgroundColor = UIColor.redColor()
        self.contentView.addSubview(self.infoL!)
        
        
        self.into = UILabel(frame: CGRectMake(self.contentView.frame.size.width-28,self.contentView.frame.size.height*0.4,self.contentView.frame.size.width*0.1,self.contentView.frame.size.height*0.2))
        self.into?.text = "﹥"
        self.contentView.addSubview(self.into!)
        
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        self.imageV?.frame = CGRectMake(self.contentView.frame.size.width*0.04, self.contentView.frame.size.height*0.1, self.contentView.frame.size.width*0.28, self.contentView.frame.size.height*0.8)
        
        self.nameL?.frame = CGRectMake(self.contentView.frame.size.width*0.35,self.contentView.frame.size.height*0.2,self.contentView.frame.size.width*0.22,self.contentView.frame.size.height*0.35)
        
        self.number?.frame =  CGRectMake(self.contentView.frame.size.width*0.57,self.contentView.frame.size.height*0.25,self.contentView.frame.size.width*0.325,self.contentView.frame.size.height*0.3)
        
        self.infoL?.frame = CGRectMake(self.contentView.frame.size.width*0.35,self.contentView.frame.size.height*0.55,self.contentView.frame.size.width*0.55,self.contentView.frame.size.height*0.35)
        
        self.into?.frame = CGRectMake(self.contentView.frame.size.width-28,self.contentView.frame.size.height*0.4,self.contentView.frame.size.width*0.1,self.contentView.frame.size.height*0.2)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    override func setSelected(selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }
    
}
